package com.chrray.position.enums.app;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 发布类型：0-个人发布,1-企业发布
 */
public enum FdJobPubTypeEnum implements BaseEnum{
    PERSONAL(0, "个人发布"),
    ENTERPRISE(1, "企业发布")
    ;

    @JsonValue
    @EnumValue
    private final Integer value;
    private final String info;

    FdJobPubTypeEnum(Integer value, String info) {
        this.info = info;
        this.value = value;
    }

    @JsonCreator
    public static FdJobPubTypeEnum getByValue(Integer value) {
        for (FdJobPubTypeEnum en : FdJobPubTypeEnum.values()) {
            if (en.getValue().equals(value)) {
                return en;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public String getInfo() {
        return info;
    }
}
